package com.hzhr.iot.collect.protocol.processor;

import com.hzhr.iot.collect.constant.MessageFieldKeyEnum;
import com.hzhr.iot.collect.protocol.util.CachedCommandUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

/**
 * NBIOT 物联网表故障信息清除指令
 * @author 48310
 *
 */
@Component
public class MessageProcessor17 implements MessageProcessor {
	@Autowired
	CachedCommandUtil cachedCommandUtil;

	@Override
	public List<Map<MessageFieldKeyEnum, Object>> proccess(int protocolId, String deviceId, Map<MessageFieldKeyEnum, Object> parsedMessageObj) throws Exception {
		cachedCommandUtil.deleteCachedCommand(deviceId,
				parsedMessageObj.get(MessageFieldKeyEnum.IOT_DEVICE_ID).toString(),
				parsedMessageObj.get(MessageFieldKeyEnum.MESSAGE_ID).toString());
		return null;
	}
}
